package com.sntk.organauthomanager.domain.model;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;

/**
 * @ClassName: IdentifyDomainObject
 * @author: wgchao
 * @createTime: 2020/7/1 2:16 PM
 * @Description: 实体
 */
@Getter
@Setter(value = AccessLevel.PROTECTED)
public class IdentifyDomainObject extends DomainObject {
    protected Long id = -1L;
    protected Long version = 0L;

    /**
     * 判断是否新增实体
     * @return
     */
    public boolean isAdd(){
        if(this.id==null || this.id.compareTo(0L)<=0){
            return true;
        }
        return false;
    }
}
